<div class="my-account form-container">
	<div class="col-left sidebar">
		<div class="block block-account">
			<div class="block-title">
				<strong>
					<span><?=lang('my_account')?></span>
				</strong>
			</div>
			<div class="block-content">
				<ul>
					<li >
						<a href="<?=site_url('user/dashboard')?>">
						<?=lang('my_dashbord')?>
						</a>	
					</li>
					<li>
						<a href="<?=site_url('user/my_account/')?>">
							<?=lang('account_info')?>
						</a>
					</li>
					<li class="current">
						<strong>
							<?=lang('my_address')?>
						</strong>					
					</li>
					<li >
						<a href="<?=site_url('user/address_book')?>">
						<?=lang('address_book')?>
						</a>	
					</li>
					<li>
						<a href="<?=site_url('user/my_orders/')?>">
							<?=lang('my_orders')?>
						</a>
					</li>
					<li >
						<a href="<?=site_url('user/newsLetter')?>">
						<?=lang('newsletter')?>
						</a>	
					</li>
					<li class="last">
						<a href="<?=site_url('user/logout/')?>">
							<?=lang('logout')?>
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="col-main">
		<?php print form_open('user/my_address/',array('id'=>'myaddressFrm'));?>
			<h1>
				<?=lang('my_address')?>
			</h1>
			<div class="formErrors">
				<?php echo validation_errors(); ?>
			</div>
			<h2 class="legend"><?=lang('contact_information')?></h2>
			<ul class="form-list">
				<li>
					<div class="fields">
						<label for="first_name"><?=lang('first_name')?><span class="required">*</span></label>
						<input id="first_name" name="first_name" class="input-field" value="<?=$user->first_name?>" />
					</div>
					<div class="fields">
						<label for="last_name"><?=lang('last_name')?><span class="required">*</span></label>
						<input id="last_name" name="last_name" class="input-field" value="<?=$user->last_name?>" />
					</div>        		
				</li>
				<li class="hiddens">
					<div class="fields">
						<label for="company"><?=lang('company')?></label>
						<input id="company" name="company" class="input-field" value="<?=$user->company?>" />  
					</div>					
					<div class="fields">
						<label for="tax_number"><?=lang('tax_number')?><span class="required hidden">*</span></label>
						<input id="tax_number" name="tax_number" class="input-field" value="<?=$user->tax_number?>" />
					</div>					
				</li>
				<li>
					<div class="fields">
						<label for="tel"><?=lang('telephone')?><span class="required">*</span></label>
						<input id="tel" name="tel" class="input-field" value="<?=$user->tel?>" />
					</div>
					<div class="fields">
						<label for="fax"><?=lang('fax')?></label>
						<input id="fax" name="fax" class="input-field" value="<?=$user->fax?>" />
					</div>        		
				</li>				
			</ul>
			<h2 class="legend"><?=lang('address')?></h2>
			<ul class="form-list">
				<li>
					<div class="fields">
						<label for="street"><?=lang('street_address')?><span class="required">*</span></label>
						<input id="street" name="street" class="input-field" value="<?=$user->street?>" />    
					</div>
					<div class="fields">
						<label for="zip"><?=lang('zip')?><span class="required">*</span></label>
						<input id="zip" name="zip" class="input-field" value="<?=$user->zip?>" />
					</div>        		
				</li>
				<li>
					<div class="fields">
						<label for="city"><?=lang('city')?><span class="required">*</span></label>
						<input id="city" name="city" class="input-field" value="<?=$user->city?>" />    
					</div>
					<div class="fields">
						<label for="country_id"><?=lang('country')?><span class="required">*</span></label>
						<select id="country_id" name="country_id" class="input-field">
							<option value="0"></option>
						<?php
							foreach ($countries as $country) {
								if ($user->country_id == $country->id) {
									echo '<option selected value="' . $country->id .  '">' . ucfirst($country->name) . '</option>';
								} 
								else {
									echo '<option value="' . $country->id .  '">' . ucfirst($country->name) . '</option>';
								}
							}
						?>
						</select>							
					</div>        		
				</li>				

			</ul>
			<div class="clear"></div>
			<div class="button" id="btn-save-address">
				<?=lang('save')?>
			 </div>						
		<?php print form_close()?>
	</div>	
	<div class="clear"></div>
</div>